#ifndef PWZD_H
#define PWZD_H

#include <arpa/inet.h>
#include "hello/clientinfo.h"
#include "hashtbl.h"
#define DEFAULT_INTERVAL 5
#define PORT "6969"

extern int verbose;
extern int clifd;
extern int client_sock_fd;
extern int multicast_sock_fd;
extern size_t tab_len;

extern HASHTBL **tab;             // #interwałów -> (adres -> client_info)
extern HASHTBL *my_interests;     // zainteresowanie -> NULL
extern HASHTBL *clients;          // adres -> client_info
extern HASHTBL *interestToClient; // zainteresowanie -> hash zainteresowań.

extern struct client_info *others;
void clean_old();

extern struct sockaddr_in groupSock;

int main(int argc, char* argv[]);
void main_loop();
void load_config(char * filename);
void setup();
#endif // PWZD_H
